<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>管理首页图片</title>
		<link href="css/style.css" rel="stylesheet" type="text/css">
	</head>

	<body>

		<center>
			<h1>管理首页图片
				</h1>
				<form action="servlet_addbannerpic" method="post" enctype="multipart/form-data"><p><p><p><p>类型:
			<select name="type">
				<option value="0" selected="selected">视频图片</option>
				<option value="1" >广告图片</option>
			</select> 
							</p> 
											<p>&nbsp; 
					标题： 
					<input type="text" name="title">
							<p>&nbsp; 
					数据： 
					<input type="text" name="data">
				</p>
				</p>
					<p>&nbsp; 
					图片： 
					<input type="file" name="pic" size="10" accept=".jpg,.bmp,.gif,.png">
				</p>

				<input name="btn_submit" type="submit" value="确定"/>
				<input type="reset" value="重置" />
				
			</form>
			
			<table align="center" border="1" width="400">
			<tr>
				<th>
					时间
				</th>
								<th>
					标题
				</th>
				<th>
					类型
				</th>
				<th>
					图片
				</th>
				<th>
					数据
				</th>
				<th>
					删除
				</th>
			</tr>

			<c:forEach var="list" items="${requestScope.list}" varStatus="index">
				<tr
					<c:if test="${index.index % 3 == 0 }"> style="background-color:rgb(240,240,240);"</c:if>
					<c:if test="${index.index % 2 == 0 }"> style="background-color:rgb(219,241,212);"</c:if>>
					<td>
						${list.addtime}
					</td>
										<td>
						${list.title}
					</td>
					<td>
						${list.type}
					</td>
					<td>
						${list.path}
						<img width="64" height="64" src="${list.path}" alt="alt">
					</td>
										<td>
						${list.data}
					</td>
					<td>
						<a href="servlet_Admdeluse?accesstoken=${list.id}"
							onclick="return window.confirm('确定删除?')">删除</a>
					</td>
				</tr>
			</c:forEach>

</table>
		</center>
	</body>
</html>
